/* Give the user the chance to save his creation right away */
REQUESTRESPONSE VAR choice TITLE '"User Query"' PROMPT '"Do you want to save this animation?"' OPTIONS "Yes|No|Don't Know"
/* Save-file feat. full(?) sanity-check */
IF choice=0 THEN DO
REQUESTFILE VAR saveanim TITLE '"Save Animation"' FILE "TransferAnim" SAVE
IF RC~=0 THEN
CALL NOTIFY("You cancelled the saving process.")
SAVEPIC NAME saveanim PLUGIN 'IFF-ILBM'
IF RC~=0 THEN
CALL NOTIFY("File" savenanim "could not be saved.")
END
/* Notify user that he can save the file at a later time */
ELSE REQUESTNOTIFY TITLE "Message" OK '"I see"' PROMPT "You can still save the|animation manually."
/* return control to user */
UNLOCKGUI
EXIT
/* Error notification - saves a few lines of code */
NOTIFY:
/* Get the actual error */
PARSE ARG Errorstring
/* Notify user via the ArtEffect-provided requester */
REQUESTNOTIFY TITLE "Error" PROMPT Errorstring
/* always make sure the GUI is unlocked after errors */
UNLOCKGUI
EXIT
RETURN
/* Handling of errors that are not intercepted by the script itself.
The most common situation for this message to appear is that the
user did not follow the naming conventions for the frames.
This error will of course also occur when trying to load files of
the wrong format - ASCII, binaries, etc. ;-) */
ERROR:
REQUESTNOTIFY TITLE "ARexx-Error" PROMPT "ARexx-error no." RC "has occured in line" SIGL ".|Please make sure the pictures are properly named|and numbered."
/* Never! forget to unlock the GUI when an error has occurred */